<script lang="ts" setup>

const clickHandle = () => {
alert('点击成功')
}
const onMousseenter = () => {
console.log('鼠标进入')
}
const onMousseleave = () => {
console.log('鼠标离开')
}
</script>

<template>
<button @click="clickHandle()">点我</button>
<div class="box" @mouseenter="onMousseenter()" @mouseleave="onMousseleave()"></div>
 
</template>


<style scoped>
.box {
  width: 100px;
  height: 100px;
  background-color: aqua;
}

</style>